package com.azt.provider.mapper;

import com.azt.api.pojo.Role;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

public interface RoleMapper extends Mapper<Role> {

	Role getRoleByUserAndRoleType(@Param("userId")Integer userId, @Param("roleType")Integer roleType);

	List<Role> searchRole(Map<String, String> searchMap);

	List<Role> findRoleByUserId(int userId);

	Role getRoleById(Integer roleId);

	List<Role> getAllRole();

	List<Role> getRolesByDeptId(Integer deptId);

	List<Role> getRoleByCompanyId(Integer companyId);

	List<Role> getRoleByCompanyIdType(@Param("companyId")Integer companyId, @Param("roleType")Integer roleType);

	List<Role> getRoleByParameter(@Param("parameterMap")Map parameterMap);


}